const execa = require("execa");
const args = require("minimist")(process.argv.slice(2));
const target = args._.length ? args._[0] : "reactivity";
const sourcemap = args.s;
const formats = args.f;
execa(
  "rollup",
  [
    "-wc",
    "--environment",
    [
      `TARGET:${target}`,
      `FORMATS:${formats || "global"}`,
      sourcemap ? `SOURCE_MAP:true` : ``,
    ]
      .filter(Boolean)
      .join(","),
  ],
  {
    stdio: "inherit",//表示
  }
);
